/*
 * Laba6App.java
 */

package laba6;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
import java.util.Date;
import java.util.TimeZone;
/**
 * The main class of the application.
 */
public class Laba6App extends SingleFrameApplication {

    /**
     * At startup create and show the main frame of the application.
     */
    @Override protected void startup() {
        try {
            show(new Laba6View(this));
        } catch (InterruptedException ex) {
            Logger.getLogger(Laba6App.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of Laba6App
     */
    public static Laba6App getApplication() {
        return Application.getInstance(Laba6App.class);
    }

    /**
     * Main method launching the application.
     */
    public static Date time;
    public static long st;
    public static void main(String[] args) throws InterruptedException {
        launch(Laba6App.class, args);
        Laba6App lab=new Laba6App();
       Laba6View l = null;
        Thread tr=new Thread();
        //SimpleDateFormat dt=new java.text.SimpleDateFormat("dd-MMM-yy G hh:mm aaa"));
        for(;;)
        {
        
        time = java.util.Calendar.getInstance().getTime();
        Laba6View.DataText.repaint(100L);
        Laba6View.DataText.setText("" + Laba6App.time);
            try {
                Thread.sleep(100);
              //  Laba6View.DataText.setText("" + Laba6App.time);
            } catch (InterruptedException ex) {
                Logger.getLogger(Laba6App.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
      

       // System.out.println(""+time);
       
    }
}
